<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">


<h:head>
	<title>Central de Estagio Administração</title>
<link rel="StyleSheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/estilo.css" media="screen" />
    <link type="text/css" rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/css/tema/theme.css"/>
</h:head>
<h:body>
	<div align="center">

		<h:form>

			<p:dataTable id="list" value="#{MBMatricula.listarAluno}" var="mat"
				paginator="true" rows="8" emptyMessage="Nenhum registro encontrado."
				paginatorPosition="bottom">

				<p:ajax event="rowToggle" />
				<p:column style="width: 0.5%;">
					<p:rowToggler />
				</p:column>
				<p:column style="width: 1%;" headerText="Cod">
					<h:outputText value="#{mat.codAluno}" />
				</p:column>
				<p:column style="width: 1%;" headerText="Matrícula"
					filterBy="#{mat.matriculaAluno}" filterMatchMode="startsWith">
					<h:outputText value="#{mat.matriculaAluno}" />
				</p:column>
				<p:column style="width: 5%;" headerText="Nome"
					filterBy="#{mat.nomeAluno}" filterMatchMode="startsWith">
					<h:outputText value="#{mat.nomeAluno}" />
				</p:column>
				<p:column style="width: 5%;" headerText="Período"
					filterBy="#{mat.periodoCursoAluno}" filterMatchMode="startsWith">>
        		<h:outputText value="#{mat.periodoCursoAluno}" />
				</p:column>
				<p:column style="width: 5%;" headerText="Curso"
					filterBy="#{mat.curso}" filterMatchMode="startsWith">>
        		<h:outputText value="#{mat.curso.nomeCurso}" />
				</p:column>
				<p:column style="width: 5%;" headerText="Data Nasc"
					filterBy="#{mat.dtNascAluno}" filterMatchMode="startsWith">>
        		<h:outputText value="#{mat.dtNascAluno}"> <f:convertDateTime pattern="dd/MM/yyyy" timeZone="America/Sao_Paulo" /></h:outputText>
				</p:column>
				<p:rowExpansion>
					<p:column>
						<p:commandButton value="Alterar"
							action="#{MBMatricula.prepararUp()}" icon="ui-icon-pencil" />
					</p:column>
					<p:column>
						<p:commandButton value="Remover" action="#{MBMatricula.delete()}"
							icon="ui-icon-trash" update="list" />
					</p:column>
				</p:rowExpansion>

			</p:dataTable>

		</h:form>
	</div>
</h:body>
</html>